class Person extends React.Component{
	showData=()=>{
		const {input1}=this.refs;
		alert(input1.value)
	}
	showData2=()=>{
		const {input2}=this.refs;
		alert(input2.value)
	}
	render(){
		return (
			<div>
				<input type="text" ref="input1" placeholder="请输入"/><br/>
				<button onClick={this.showData}>点击提示数据</button><br/>
				<input type="text" ref="input2" onBlur={this.showData2} placeholder="失去焦点提示信息"/>
			</div>
		);
	}
}
ReactDOM.render(<Person/> ,document.getElementById("test"));
